#ifndef MAINWINDOW_H
#define MAINWINDOW_H
//#include "mylineedit.h"
#include <QMainWindow>
#include <QMessageBox>
#include <QNetworkInterface>
#include <QList>
#include <QNetworkInterface>
#include <QNetworkAddressEntry>
#include <QSettings>
#include <QCoreApplication>
#include "ippack.h"
#include "about.h"
#include "macbox.h"
#include <QFile>
#include <QProcess>
#include <QValidator>
#include <QSystemTrayIcon>
#include <QDesktopServices>
#include <QUrl>
#include <QInputDialog>
#include <QDir>
#include "ip2subnetmask.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    // my Data vars
    QString currentAdapter;
    int currentAdapterIndex;
    QList<QNetworkInterface> interfaceList;
    QStringList myAdapterList;
    QList<ippack> ipList;
    // Window objects
    macbox myMB;
    about aboutWindow;
    QSystemTrayIcon mySystemTrayIcon;
    // predefined funcs
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    // Settings store level
    void ipPackReader();
    void ipPackWriter();
    void adapterListMaker();
    void adapterUserSettingsUpdater();
    // action level
    QString updateDnsFile();
    void updateInterfaceFile(QString DNS);
    void changeMACNow();
    void dialUpNow();
    void populateSubnetMask();
    // GUI Settings Level
    void guiMaker();
    bool systemTrayMessage(QString, QString);

protected:
    void changeEvent(QEvent *e);

private:
    Ui::MainWindow *ui;

private slots:
    void on_checkBox_2_clicked();
    void on_pushButton_clicked();
    void on_checkBox_stateChanged(int );
    void on_actionPing_triggered();
    void on_actionProject_Homepage_triggered();
    void on_actionAbout_triggered();
    void on_actionDial_up_triggered();
    void on_commandLinkButton_clicked();
    void on_comboBox_currentIndexChanged(QString );
    void on_actionChange_MAC_Address_triggered();
    // my own slots
    void systemTrayIconClicked();
};

#endif // MAINWINDOW_H
